<template>
  <div class="jacinto-extension-sidebar" :class="{'jacinto-sidebar-hidden': !showNav}">
    <div class="jacinto-side-nav" >
      <div class="side-nav-bottom-wrapper">
        <div class="side-nav-box" @click="taggleSideNav">
          <img src="@/assets/images/icons/leftup.png" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
        showNav: true
    };
  },
  methods: {
      // 关闭导航栏
      taggleSideNav(){
          this.showNav = !this.showNav
      }
  }
};
</script>
<style lang="scss" scoped>
.jacinto-extension-sidebar {
  z-index: 2147483640;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 40px;
  font-size: 16px;
  transform: translateX(0);

  .jacinto-side-nav {
    height: 100vh;
    min-height: 420px;
    background: #fff;
    border: 1px solid #efefef;
    box-shadow: -10px 0px 30px 0 rgba(0, 0, 0, 0.16);
  }
  .side-nav-bottom-wrapper {
    position: absolute;
    bottom: 10vh;
    left: 0;
    padding: 20px 0;
  }
  .side-nav-box {
    width: 40px;
    cursor: pointer;
    margin-top: 20px;
    img {
      width: 20px;
      height: 20px;
      display: block;
      margin: 0 auto 10px;
    }
  }
}
.jacinto-sidebar-hidden {
    transform: translateX(-40px);
}
</style>